<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="com.milk.entity.Orders" %>
<%@ page import="java.text.SimpleDateFormat" %>
<html>
<head>
    <title>修改订单</title>
</head>
<body>
<h3>修改订单</h3>
<form action="<%=request.getContextPath()%>/orders/update" method="post">
    <input type="hidden" name="id" value="<%=((Orders) request.getAttribute("order")).getId()%>">
    <label for="userName">用户名</label><input type="text" id="userName" name="userName" placeholder="请输入用户名" value="<%=((Orders) request.getAttribute("order")).getUserName()%>"><br>
    <label for="contactPhone">联系电话</label><input type="text" id="contactPhone" name="contactPhone" placeholder="请输入联系电话" value="<%=((Orders) request.getAttribute("order")).getContactPhone()%>"><br>
    <label for="orderTime">下单时间</label><input type="datetime-local" id="orderTime" name="orderTime" placeholder="请输入下单时间" value="<%=new SimpleDateFormat("yyyy-MM-dd'T'HH:mm").format(((Orders) request.getAttribute("order")).getOrderTime())%>"><br>
    <label for="status">订单状态</label><input type="text" id="status" name="status" placeholder="请输入订单状态（如待支付、已支付、配送中、已完成等）" value="<%=((Orders) request.getAttribute("order")).getStatus()%>"><br>
    <label for="drinkIds">饮品ID列表</label><input type="text" id="drinkIds" name="drinkIds" placeholder="请输入饮品ID列表（以逗号分隔，示例：1,2,3）" value="<%=((Orders) request.getAttribute("order")).getDrinkIds()%>"><br>
    <button type="submit">修改</button>
</form>
<p>修改成功后，您将跳转到更新结果页面。</p>
</body>
</html>